package com.groupbuying.currency.producer.mq;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class CurrencyMQConfig {
    public static  String TOPIC ;
    public static  String GROUP_ID;
    public static final String ACCESS_KEY = "LTAIkLoCSLqX7QFG";
    public static final String SECRET_KEY = "anr8xwxEFrN4Rq0Gjw5MXxELuDb12V";
    public static final String NAMESRV_ADDR = "http://onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80";

    //注入对应中心的topic
    @Value("${rocketMqKey.currency.topic}")
    private void setTOPIC(String TOPIC) {
        CurrencyMQConfig.TOPIC = TOPIC;
    }
    //注入对应中心的groupId
    @Value("${rocketMqKey.currency.groupId}")
    private void setGroupId(String groupId) {
        CurrencyMQConfig.GROUP_ID = groupId;
    }

    //---------------Tag——————————————
    //支付成功标记
    public static final String TAG_PAY_STATE_SUCCESS = "PAY_STATE_SUCCESS";

    //交易状态前缀
    public static final String DEAL_TAG_PREFIX = "DEAL_";

    //消费者订阅全部tag
    public static final String ALL_TAG = "*";

}
